Latest update: April 2018
In this tutorial we will introduce the measured value function of FlashAir IoT Hub.
Using the measured value function, you can easily display measured values read from temperature sensors etc. in graphs.
The graph of the data of the latest 30 minutes is displayed in "Trigger > Measured value" on the screen.
Up to five measured values can be sent from FlashAir at the same time and are displayed on the graph, respectively.
Each graph can be given an arbitrary name so that you can see which value is displayed.
You can edit by clicking the label part.
You can download past data collectively with CSV file. (Up to 1000 newest)
An example of sending measured values from FlashAir to FlashAir IoT Hub and displaying it on a graph will be introduced.
Please prepare to be able to connect from FlashAir to FlashAir IoT Hub in advance referring to Flow of use.
The sample script
bootscript.lua
that can be downloaded from FlashAir IoT Hub has the following contents.
In this tutorial, only the processing related to measured values is explained. Other processing will be explained in other tutorials.
local iothub = require("iothub")
-- iothub.startPioUpload(0x03)
-- iothub.stopPioUpload()
local cnt = 0
while(1) do
iothub.runJob()
iothub.addMeasurement({10, 20, cnt})
cnt = cnt + 1
sleep(10000)
collectgarbage("collect")
end
iothub.addMesurement({x, y, ...})
is used to send the measured value to FlashAir IoT Hub.
Let's try to actually send measured values. Please put FlashAir in a card reader etc. where you can connect to the access point.
I think you can see that the graph of measured values is being updated little by little.
In this tutorial, we are sending sample values, but let's change it to your own use by referring to the sample script.